export default function (method, url, params, header = { 'content-type': 'application/x-www-form-urlencoded' }) {
    return new Promise(function (resolve, reject) {
        wx.request({
            url: url,
            method: method,
            data: params,
            header: header,
            dataType: 'json',
            responseType: 'text',
            success(res) {
                resolve(res)
            },
            fail(err) {
                //请求失败
                reject(err)
            }
        })
    })
}

